package Dinghuo;

import java.util.ArrayList;
import java.util.List;

/**
 * @author lijunhao
 * 2023/7/13 练习
 * @description TODO
 */
public class Oder {
    private int orderNumber;
    private List<Goods> goodsList;

    public void Order(int orderNumber) {
        this.orderNumber = orderNumber;
        goodsList = new ArrayList<>();
    }

    public void addGoods(Goods goods) {
        goodsList.add(goods);
    }

    public void displayGoodsInfo() {
        for (Goods goods : goodsList) {
            System.out.println("商品名称：" + goods.getName());
            System.out.println("商品价格：" + goods.getPrice());
        }
    }
}
